import { createWebHashHistory, createRouter } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'main',
    component: () => import('@/views/MainView.vue'),
    children: [
      {
        path: '/local',
        name: 'local',
        meta: { keepAlive: true },
        component: () => import('@/views/LocalView.vue')
      },
      {
        path: '/ssh',
        name: 'ssh',
        meta: { keepAlive: true },
        component: () => import('@/views/SSHView.vue')
      }
    ]
  }
]

const router = createRouter({
  mode: 'hash',
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes
})

export default router
